<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"gitee.com","root":"/blog/","scheme":"Muse","version":"8.0.0-rc.4","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":true,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="超基础命令 查看指定目录下的文件和目录信息 ls  123-a 所有, 包括以.开头的隐藏文件-l 显示文件的详细信息-h 必须配合 -l 一起使用才有效, 以对人类友好的方式显示文件大小">
<meta property="og:type" content="article">
<meta property="og:title" content="开发常用Linux指令">
<meta property="og:url" content="https://gitee.com/indoorsman_lab/blog/2020/07/09/%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8Linux%E6%8C%87%E4%BB%A4/index.html">
<meta property="og:site_name" content="宅人类研究室">
<meta property="og:description" content="超基础命令 查看指定目录下的文件和目录信息 ls  123-a 所有, 包括以.开头的隐藏文件-l 显示文件的详细信息-h 必须配合 -l 一起使用才有效, 以对人类友好的方式显示文件大小">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-09T07:32:41.000Z">
<meta property="article:modified_time" content="2020-07-15T11:49:33.272Z">
<meta property="article:author" content="张雪峰">
<meta property="article:tag" content="命令">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://gitee.com/indoorsman_lab/blog/2020/07/09/%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8Linux%E6%8C%87%E4%BB%A4/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>开发常用Linux指令 | 宅人类研究室</title>
  






  <noscript>
  <style>
  body { margin-top: 2rem; }

  .use-motion .header,
  .use-motion .site-brand-container .toggle,
  .use-motion .menu-item,
  .use-motion .sidebar,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header,
  .use-motion .footer { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle,
  .use-motion .custom-logo-image {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line {
    transform: scaleX(1);
  }

  .search-pop-overlay, .sidebar-nav { display: none; }
  .sidebar-panel { display: block; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <main class="main">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader">
        <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
        <span class="toggle-line toggle-line-first"></span>
        <span class="toggle-line toggle-line-middle"></span>
        <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">宅人类研究室</h1>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">IndoorsMan Lab</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/blog/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blog/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <section class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#超基础命令"><span class="nav-number">1.</span> <span class="nav-text">超基础命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#文件相关命令"><span class="nav-number">2.</span> <span class="nav-text">文件相关命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#系统工作命令"><span class="nav-number">3.</span> <span class="nav-text">系统工作命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#系统状态命令"><span class="nav-number">4.</span> <span class="nav-text">系统状态命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#用户和文件的权限控制"><span class="nav-number">5.</span> <span class="nav-text">用户和文件的权限控制</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#打包压缩"><span class="nav-number">6.</span> <span class="nav-text">打包压缩</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#搜索命令"><span class="nav-number">7.</span> <span class="nav-text">搜索命令</span></a></li></ol></div>
      </section>
      <!--/noindex-->

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="张雪峰"
      src="/blog/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">张雪峰</p>
  <div class="site-description" itemprop="description">IndoorsMan Lab</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">15</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">5</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blog/tags/">
          
        <span class="site-state-item-count">12</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/indoorsmanlab" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;indoorsmanlab" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://gitee.com/indoorsman_lab" title="Gitee → https:&#x2F;&#x2F;gitee.com&#x2F;indoorsman_lab"><i class="fab fa-git-square fa-fw"></i>Gitee</a>
      </span>
  </div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://blog.csdn.net/m0_46238775" title="https:&#x2F;&#x2F;blog.csdn.net&#x2F;m0_46238775" rel="noopener" target="_blank">宅人类研究室-CSDN</a>
        </li>
    </ul>
  </div>

      </section>
    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </header>

      
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

  <a href="https://github.com/indoorsmanlab" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>

<noscript>
  <div id="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


      <div class="main-inner">
        

        <div class="content post posts-expand">
          

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://gitee.com/indoorsman_lab/blog/2020/07/09/%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8Linux%E6%8C%87%E4%BB%A4/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/avatar.jpg">
      <meta itemprop="name" content="张雪峰">
      <meta itemprop="description" content="IndoorsMan Lab">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="宅人类研究室">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          开发常用Linux指令
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-09 15:32:41" itemprop="dateCreated datePublished" datetime="2020-07-09T15:32:41+08:00">2020-07-09</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-07-15 19:49:33" itemprop="dateModified" datetime="2020-07-15T19:49:33+08:00">2020-07-15</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/Linux/" itemprop="url" rel="index"><span itemprop="name">Linux</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="超基础命令"><a href="#超基础命令" class="headerlink" title="超基础命令"></a>超基础命令</h3><ul>
<li><p>查看指定目录下的文件和目录信息 ls </p>
<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-a 所有, 包括以.开头的隐藏文件</span></span><br><span class="line"><span class="deletion">-l 显示文件的详细信息</span></span><br><span class="line"><span class="deletion">-h 必须配合 -l 一起使用才有效, 以对人类友好的方式显示文件大小</span></span><br></pre></td></tr></table></figure>
<a id="more"></a>
</li>
<li><p>切换目录 cd </p>
<figure class="highlight asciidoc"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="code"> / 根目录</span></span><br><span class="line">~ 当前用户的家目录</span><br><span class="line"><span class="bullet">.. </span>上一级目录</span><br><span class="line"><span class="bullet">. </span>当前目录</span><br><span class="line"><span class="bullet">- </span>刚才所在的目录</span><br></pre></td></tr></table></figure></li>
<li><p>显示当前所在路径 pwd</p>
</li>
<li><p>查看文件目录结构 tree</p>
</li>
<li><p>新建目录 mkdir<br><code>-p 父目录不存在时自动创建, 可以一口气创建多级嵌套的子目录</code></p>
</li>
<li><p>新建文件或修改时间 touch</p>
<figure class="highlight haml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">-<span class="ruby">a 只修改<span class="string">"读取"</span>时间</span></span><br><span class="line"><span class="ruby">-m 只修改<span class="string">"修改"</span>时间</span></span><br><span class="line"><span class="ruby">-d 同时修改读取和修改时间</span></span><br></pre></td></tr></table></figure></li>
<li><p>删除文件或目录 rm</p>
<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-r 递归删除目录和子目录中所有文件</span></span><br><span class="line"><span class="deletion">-i 交互式删除, 删之前问一句</span></span><br><span class="line"><span class="deletion">-f 强制删除, 忽略不存在的提示</span></span><br><span class="line"><span class="deletion">-d 删除空目录, 相当于rmdir</span></span><br></pre></td></tr></table></figure></li>
<li><p>删除空目录 rmdir</p>
</li>
<li><p>拷贝 cp</p>
<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-r 递归拷贝源目录, 用来复制目录</span></span><br><span class="line"><span class="deletion">-i 交互式拷贝</span></span><br><span class="line"><span class="deletion">-v 显示拷贝的路径对应关系</span></span><br><span class="line"><span class="deletion">-a 保留原文件的原有属性(权限, 时间...)</span></span><br></pre></td></tr></table></figure></li>
<li><p>远程拷贝 scp<br><code>-r 操作目录</code></p>
</li>
<li><p>移动文件或目录 mv    原地移动相当于文件的重命名</p>
<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-i 交互式, 存在同名询问是否覆盖</span></span><br><span class="line"><span class="deletion">-v 显示移动路径</span></span><br></pre></td></tr></table></figure></li>
<li><p>查看文件的类型 file</p>
</li>
<li><p>按照指定大小和个数的数据块来复制或转换文件 dd</p>
</li>
</ul>
<h3 id="文件相关命令"><a href="#文件相关命令" class="headerlink" title="文件相关命令"></a>文件相关命令</h3><ul>
<li>cat 查看内容较少的纯文本文件<br><code>-n 显示行号</code></li>
<li>more 查看内容较多的纯文本文件</li>
<li>head 查看纯文本文件的前N行<br><code>-n 指定行数</code></li>
<li>tail 查看纯文本文件的后N行  常用于查看日志文件<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-f 实时刷新</span></span><br><span class="line"><span class="deletion">-n 指定行数</span></span><br></pre></td></tr></table></figure></li>
<li>tr 替换文本文件中的字符</li>
<li>wc 统计指定文本的行数、字数、字节数<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-l 只显示行数</span></span><br><span class="line"><span class="deletion">-w 只显示单词数</span></span><br><span class="line"><span class="deletion">-c 只显示字节数</span></span><br></pre></td></tr></table></figure></li>
<li>stat 查看文件的具体存储信息和时间等信息</li>
<li>cut 按列提取文本字符</li>
<li>diff 对比多个文本文件的差异</li>
</ul>
<h3 id="系统工作命令"><a href="#系统工作命令" class="headerlink" title="系统工作命令"></a>系统工作命令</h3><ul>
<li>echo 在终端输出</li>
<li>date 显示和设置系统的日期时间</li>
<li>reboot 重启 需要root权限</li>
<li>poweroff 关机 需要root权限</li>
<li>wget 在终端下载网络文件</li>
<li>ps 查看系统中的进程状态</li>
<li>top 动态地监视进程和系统负载等信息</li>
<li>pidof 查询某个指定进程的进程ID(PID)</li>
<li>kill 终止某个指定PID的进程</li>
<li>killall 终止某个指定名称的服务对应的所有进程</li>
</ul>
<h3 id="系统状态命令"><a href="#系统状态命令" class="headerlink" title="系统状态命令"></a>系统状态命令</h3><ul>
<li>ifconfig 获取网卡配置和网络状态等信息</li>
<li>uname 查看系统内核和版本信息</li>
<li>uptime 查看系统的负载信息</li>
<li>free 查看当前系统中内存的使用量信息<br><code>-h 人性化显示</code></li>
<li>who 查看当前登入主机的用户终端信息</li>
<li>last 查看系统的登录记录</li>
<li>history 查看历史执行过的命令</li>
<li>sosreport 收集系统架构信息并输出诊断文档</li>
</ul>
<h3 id="用户和文件的权限控制"><a href="#用户和文件的权限控制" class="headerlink" title="用户和文件的权限控制"></a>用户和文件的权限控制</h3><ul>
<li>文件操作权限 chmod<ul>
<li>字母法 +/-/= rwx</li>
<li>数字法 xxx 7 6 5 4 3 2 1 0  r-4 w-2 x-1</li>
</ul>
</li>
<li>用户权限相关操作<ul>
<li>sudo -s 切换成root用户</li>
<li>whoami 查看当前用户</li>
<li>exit 退出当前用户, 如果是最后一个用户, 则退出终端</li>
<li>who 查看正在使用当前系统的用户</li>
<li>passwd + 用户名  修改用户的密码</li>
<li>which + 命令 查看命令所在的位置</li>
<li>useradd 添加用户<br>  <code>-m -g 在创建用户的同时指定所属主要组</code></li>
<li>su 切换用户</li>
<li>userdel 删除用户</li>
<li>usermod 修改用户所属组<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-g 主要组</span></span><br><span class="line"><span class="deletion">-G 附加组</span></span><br></pre></td></tr></table></figure></li>
<li>gpasswd 修改附加组的用户<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-d 从附加组删除</span></span><br><span class="line"><span class="deletion">-a 添加到附加组</span></span><br></pre></td></tr></table></figure></li>
<li>groupadd 创建主要组</li>
<li>groupdel 删除主要组</li>
</ul>
</li>
</ul>
<h3 id="打包压缩"><a href="#打包压缩" class="headerlink" title="打包压缩"></a>打包压缩</h3><ul>
<li>tar 对文件进行压缩和解压缩<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="deletion">-c 压缩</span></span><br><span class="line"><span class="deletion">-x 解压缩</span></span><br><span class="line"><span class="deletion">-t 查看压缩包里有哪些文件</span></span><br><span class="line"><span class="deletion">-z 使用gzip格式压缩和解压缩</span></span><br><span class="line"><span class="deletion">-j 使用bzip2格式压缩和解压缩</span></span><br><span class="line"><span class="deletion">-v 显示压缩和解压缩的过程</span></span><br><span class="line"><span class="deletion">-f 目标文件名</span></span><br><span class="line"><span class="deletion">-P 保留原始权限和属性</span></span><br><span class="line"><span class="deletion">-p 使用绝对路径压缩</span></span><br><span class="line"><span class="deletion">-C 指定解压缩到的目录</span></span><br></pre></td></tr></table></figure></li>
<li>zip 对zip格式进行压缩</li>
<li>unzip 对zip格式进行解压缩<br><code>-d 指定路径解压缩</code><h3 id="搜索命令"><a href="#搜索命令" class="headerlink" title="搜索命令"></a>搜索命令</h3></li>
<li>grep 在文本中进行关键词搜索, 并显示匹配的结果</li>
<li>find 按照指定条件查找文件</li>
</ul>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blog/tags/%E5%91%BD%E4%BB%A4/" rel="tag"><i class="fa fa-tag"></i> 命令</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/2020/07/03/Python%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%9A%84%E9%97%AE%E4%B8%8E%E7%AD%94/" rel="prev" title="Python面向对象的问与答">
      <i class="fa fa-chevron-left"></i> Python面向对象的问与答
    </a></div>
      <div class="post-nav-item">
    <a href="/blog/2020/07/09/%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8Linux%E7%AC%A6%E5%8F%B7/" rel="next" title="开发常用Linux符号">
      开发常用Linux符号 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



        </div>
        

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fas fa-yin-yang"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">张雪峰</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/muse.js"></script>


<script src="/blog/js/next-boot.js"></script>


  















  

  

</body>
</html>
